Why do we need Hash by key? [migrated]

Posted by Royi Namir on Server Fault See other posts from Server Fault or by Royi Namir
Published on 2012-11-10T07:50:30Z Indexed on 2012/11/10 11:06 UTC
Read the original article Hit count: 341

Filed under:
|

(i'm just trying to find what am I missing...)

Assuming John have a clear text message , he can create a regular hash ( like md5 , or sha256) and then encrypt the message.

John can now send Paul the message + its (clear text)hash and Paul can know if the message was altered. ( decrypt and then compare hashes).

Even if an attacker can change the encrpyted data ( without decrypt) - - when paul will open the message - and recalc the hash - it wont generate the same hash as the one john sent him.

so why do we need hash by key ?

enter image description here

enter image description here

© Server Fault or respective owner

Related posts about security

Related posts about hash